import model.Student1;

import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

public class HashSetTest {
    public static void main(String[] args) {
        Set<Long> set1=new HashSet<Long>();
        System.out.println(set1.add(1L));
        System.out.println(set1.add(3L));
        System.out.println(set1.add(2L));
        System.out.println(set1.add(3L));
        System.out.println(set1);

        List<Long> list= Arrays.asList(1L,3L,2L,3L);

        Set<Student1> set3=new HashSet<Student1>();
        set3.add(new Student1(1L,"aaa"));
        set3.add(new Student1(2L,"bbb"));
        set3.add(new Student1(3L,"ccc"));
    }
}
